package cn.yinuo.website.medicine.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableLogic;
import java.io.Serializable;



import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author shiyang
 * @since 2019-05-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Medicine extends Model<Medicine> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    private String code;

    /**
     * 简称
     */
    @TableField("shot_name")
    private String shotName;

    /**
     * 药品图片url，多张用逗号
     */
    private String image;

    /**
     * 对应疾病id
     */
    @TableField("disease_id")
    private Long diseaseId;

    /**
     * 品牌
     */
    private String make;

    /**
     * 剂型
     */
    private String form;

    /**
     * 单位
     */
    private String unit;

    /**
     * 规格
     */
    private String spec;

    /**
     * 短简介
     */
    @TableField("shot_introduct")
    private String shotIntroduct;

    /**
     * 药品简介
     */
    private String introduct;

    /**
     * 副作用及并发症
     */
    @TableField("side_effect")
    private String sideEffect;

    /**
     * 耐药性
     */
    private String resistant;

    @TableField("created_dt")
    private Date createdDt;

    @TableField("created_by")
    private Long createdBy;

    @TableField("updated_dt")
    private Date updatedDt;

    @TableField("updated_by")
    private Long updatedBy;

    @TableLogic
    private Boolean dr;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
